<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 定义数组
        var arr = [1, 2, 3, 4, 5];
        // 解构语法
        var [a, b, c, d, e] = arr;
        console.log(arr);
        var obj = {
            name: "dsds",
            age: 13,
            sex: "男"
        }
        var obj1 = {
            height: 200,
            ...obj,
            fn: (...args) => console.log(this, args)
        }
        console.log(obj1);
        obj1.fn(1, 2, 3)
        var arr = [
            { type: "大菜", name: "鱼香肉丝", price: 10 },
            { type: "大菜", name: "红烧肉", price: 10 },
            { type: "大菜", name: "香辣粉", price: 10 },
            { type: "中菜", name: "小炒肉", price: 13 },
            { type: "中菜", name: "云吞", price: 14 },
            { type: "小菜", name: "雪糕", price: 15 },
            { type: "小菜", name: "黄瓜", price: 16 }
        ]

        var arr1 = arr.filter(function (value) {
            return value.price < 13
        })
        console.log(arr1)
    </script>
</body>

</html>